module HasManyCharacters
  
  
  
  def characters
    @characters ||= []
    @characters
  end
  
  def add_character(val)
    @characters ||= []
    raise "You have reached your limit of characters" if @characters.length == 3
    
    @characters << val 
  end
  
  def remove_character(name)
    @characters ||= []
    @characters.delete_if {|x| x.name == name}
  end
  
  # this is because Class.superclass doesn't include modules.. but super does.. 
  # but super can only call the same method that it's invoked in..
=begin
  self.metaclass.instance_eval do
    define_method :to_yaml_properties do
      ['@props', '@characters']
    end
  end
=end
  
  
end